home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / A / Anim Cursor.cpt / pascal / CursorAnimation.lsp < prev    next >
Encoding:
Text File  |  1989-05-08  |  1.4 KB  |  32 lines  |  [TEXT/PJMM]

  1. program CursorAnimation;
  2.  
  3.     uses
  4.         CursorCtl;
  5.  
  6. {This demo test shows how to use a beach ball cursor with Lightspeed Pascal.  This program and the accompanying}
  7. {cursor control unit have been modified from a unit I downloaded from a network one day.  I would like to give credit}
  8. {to Chris Reed of San Angelo, Texas.  Because he asked not to distribute modified copies of his work, I'm uploading this}
  9. {as mine.  I needed to use the routines in my application, but some modifications were necessary to make them}
  10. {commercially sound, especially exception handling.  Mr. Reed's routines would crash if the "acur" or related  resources}
  11. {were not in the resource file or could not be loaded.  Also, his routines used SetUpA5 and RestoreA5 routines which are}
  12. {buggy (tech note 208).  Finally, my routines accept the speed of animation as a parameter, and can be used with any}
  13. {valid "acur" resource as long as it contains the IDs of all related "CURS" resources and those resources are in the}
  14. {resource file also.}
  15. {Please use these routines as you please and if you'd like some other hints or helpful examples drop me a memo.}
  16.  
  17. {Yasser Farra}
  18. {Box 7351}
  19. {Austin, TX 78713}
  20. {AppleLink: D3002}
  21. {GEnie: Y.FARRA}
  22.  
  23. begin
  24.     InitCursAnimation(0);    {If "acur" resource 0, or the associated "CURS" resources not found, watch cursor will be used}
  25.     AnimateCursor(6);    {Number of ticks between consecutive frames}
  26.  
  27. {Do some processing here}
  28.     repeat
  29.     until button;
  30.  
  31.     StopCursor;
  32. end.